export default {
  mode:'universal',
  /*
  ** Headers of the page
  */
  head:{
    title:'小梁情报 | 日常分享博客，利用空余时间写自己心得，把好的内容和一些优惠活动分享给大家',
    meta:[
      {charset:'utf-8'},
      {name:'viewport',content:'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0'},
      {name:'format-detection',content:'telephone=no'},
    ],
    link:[
      {rel:'icon',type:'image/x-icon',href:'/favicon.ico'},
    ],
    script:[
      // 加入百度统计js，使用时自行添加为自己的
      {src:'https://hm.baidu.com/hm.js?3fe14007f4e50044632c218e1f0d719c'},
      {src:'https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js'},
      {src:'https://cdn.bootcss.com/jquery.qrcode/1.0/jquery.qrcode.min.js'},
      {src:'https://cdn.bootcss.com/tocbot/4.8.1/tocbot.min.js'},
    ],
  },
  /*
  ** Customize the progress-bar color
  */
  loading:'./components/Loading',
  router:{
    middleware:'global',
    scrollBehavior(to,from,savedPosition){
      return {
        x:0,
        y:0
      }
    }
  },
  /*
  ** Global CSS
  */
  css:[
    'element-ui/lib/theme-chalk/index.css',
    './assets/scss/global.scss',

  ],
  styleResources:{
    scss:['./assets/scss/variable.scss']
  },
  /*
  ** Plugins to load before mounting the App
  */
  plugins:[
    '@/plugins/axios',
    {src:'@/plugins/element-ui',ssr:true},
    {src:'@/plugins/moment',ssr:true},


  ],
  /*
  ** Nuxt.js dev-modules
  */
  buildModules:[],
  /*
  ** Nuxt.js modules
  */
  modules:[
    ['@nuxtjs/axios',{anotherOption:true}],
    '@nuxtjs/style-resources',
    '@nuxtjs/proxy'
  ],
  axios:{
    proxy:true
  },
  /*
  ** Build configuration
  */
  build:{
    transpile:[/^element-ui/],
    // extractCSS: true,
    // publicPath:  'http://localhost:8088/client',
    /*
    ** You can extend webpack config here
    */
    extend(config,ctx){
    }
  },
  // 改为自己的地址
  proxy:{
    '/api':{
      target:'http://localhost:8090/',
      pathRewrite:{
        '^/api':'/'
      }
    },
  },
  render:{
    resourceHints:false,
  },
  env:{
    baseUrl:'/api',
    Authorization:{'API-Authorization':'1'},
  }
}
